<template>
	<div>
		<button type="primary" plain open-type="getUserInfo" @getuserinfo="handleGetUserInfo">登录</button>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				erInfo: {},
				openid: ''
			};
		},
		methods: {
			handleGetUserInfo(e) {
				const {
					userInfo
				} = e.detail
				uni.setStorageSync('userInfo', userInfo)
				uni.navigateBack({
					delta: 1,
					animationType: 'pop-out',
					animationDuration: 200
				})
			}
		}
	}
</script>

<style lang='less' scope>
	button {
		margin-top: 40rpx;
		width: 70%;
	}
</style>
